<div class="path">
    <i class="iconfont icon-shouye1"></i>
    <a href="{url('admin/default/welcome')}">开始</a> / 
    <a href="javascript:void(0);">故障诊断</a>
</div>
<form id="form" action="{url('diacrisis/logs')}" method="post">
<div class="table-search fn-clear">
<ul>
<li>
    <span class="fn-tar">IMEI号:</span>
    <span class="sinput"><input class="input w80" type="text" name="imei" value="{$imei}" /></span>
</li>
<li>
    <span class="fn-tar">门店号:</span>
    <span class="sinput">
<select class="select" name="supplier_id">
    <option value="" selected="selected"></option>
{loop $supplier_lists $vo} 
    <option value="{$vo['id']}" {if $supplier_id ==$vo['id']} selected="selected"{/if}>{$vo['name']}</option>
{/loop}
</select>
    </span>
</li>
<li>
    <span class="fn-tar">跟踪号:</span>
    <span class="sinput"><input class="input w80" type="text" name="number" value="{$number}" /></span>
</li>
<li>
    <span class="fn-tar">DHL快递号:</span>
    <span class="sinput"><input class="input w80" type="text" name="ems_sn" value="{$ems_sn}" /></span>
</li>
<li>
    <span class="fn-tar">产品名称:</span>
    <span class="sinput">
<select class="select" name="producttype_id">
    <option value="" {if !$producttype_id} selected="selected"{/if}></option>
{loop $producttype_lists $vo} 
    <option value="{$vo['id']}" {if $producttype_id ==$vo['id']} selected="selected"{/if}>{$vo['name']}</option>
{/loop}
</select>
    </span>
</li>
<li>
    <span class="fn-tar">厂商:</span>
    <span class="sinput">
<select class="select" name="manufacturer_id">
    <option value="" {if !$manufacturer_id} selected="selected"{/if}></option>
{loop $manufacturer_lists $vo} 
    <option value="{$vo['id']}" {if $manufacturer_id ==$vo['id']} selected="selected"{/if}>{$vo['name']}</option>
{/loop}
</select>
    </span>
</li>
<li>
    <span class="fn-tar">诊断时间起:</span>
    <span class="sinput"><input class="input ui-date w100" type="text" name="start_time" value="{$start_time}" /></span>
</li>
<li>
    <span class="fn-tar">诊断时间止:</span>
    <span class="sinput"><input class="input ui-date w100" type="text" name="end_time" value="{$end_time}" /></span>
</li>
<li><input type="submit" value="查找" class="button button-green submit" /></li>
</ul>
</div>
</form>
<div class="table-head fn-clear"> 
    <div class="fn-r">
        <a href="{url('diacrisis/logs',$search)}" class="button button-blue">
            <i class="iconfont icon-tianjia"></i> 导出
        </a>
        <a href="javascript:;" onClick="doPrint()"  class="button">
            <i class="iconfont icon-dayinji"></i> 打印
        </a>
    </div>    
</div>
<div class="m10">
<!--startprint-->
<table class="table table-border">
<thead>
    <tr>
        <th class="fn-tac w120">跟踪号</th>
        <th class="fn-tac w120">IMEI号</th> 
        <th>机型</th>
        <th>厂商</th>
        <th class="fn-tac w100">购买日期</th>
        <th class="fn-tac w60">保内</th>
        <th class="fn-tac w60">紧急</th>
        <th class="fn-tac w60">诊断人</th>
    </tr>
</thead>
<tbody>
{loop $list $vo}
<tr>
    <td class="fn-tac"><a title="详情" href="javascript:void(0);" url="{url('diacrisis/reads',array(id=>$vo['id']))}" class="win">{$vo['number']}</a></td>
    <td class="fn-tac">{$vo['imei']}</td>
    <td>{$vo['producttype_name']}</td>
    <td>{$vo['manufacturer_name']}</td>
    <td class="fn-tac">{date('Y-m-d',$vo['shop_time'])}</td>
    <td class="fn-tac">{if $vo['overtime'] == '是'}<span class="badge">保内</span>{else}<span class="badge bg-red">过保</span>{/if}</td>
    <td class="fn-tac">{if $vo['is_urgent']}<span class="badge bg-red">加急</span>{else}<span class="badge">普通</span>{/if}</td>
    <td class="fn-tac">{$vo['diacrisis_admin_name']}</td>
</tr>
{/loop}
</tbody>
</table>
<!--endprint-->
<div id="page" class="fn-clear">{$pager}</div>
</div>
<script type="text/javascript">
Do('base','form','date','dialog',function(){ 
  $('.win').click(function(){$(this).win();});
  $('#form').forms({types:'post'});
})
function doPrint() { 
    bdhtml=window.document.body.innerHTML; 
    sprnstr="<!--startprint-->"; 
    eprnstr="<!--endprint-->"; 
    prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); 
    prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); 
    window.document.body.innerHTML=prnhtml; 
    window.print(); 
}
</script>
